Alibabacloud.com offers a wide variety of articles about full stack deep learning bootcamp, easily find your full stack deep learning bootcamp information here online.
encoding to convert TEMP_GBK = Temp_unicode.encode ("GBK") # Output converted to GBK encoding print (TEMP_GBK)DOS Window execution test:C:\users\anshe>python F:\Python_code\sublime\Day02\print.py ChineseAnother method:Code:#_*_coding:utf-8_*_# defines a variable content in Chinese, the character set is utf-8temp= "Chinese" # decoding, You need to specify what encoding Temp_unicode=temp.decode ("Utf-8") # output is converted to GBK encoding print (Temp_unicode) # Windows terminal requires Gbk,do
listLi.insert (0, ' Tony ') print (LI)4. Please modify the element in the 2nd position of the list to ' Kelly ' and output the modified listLi[1] = ' Kelly ' Print (LI)5. Add each element of the list l2=[1, ' A ', 3,4, ' heart ' to the list Li, a line of code is implemented, and the loop is not allowed to add.L2 = [1, ' A ', 3,4, ' heart ']6. Add each element of the string s = ' Qwert ' to the list Li, a line of code is implemented, and the loop is not allowed to add.#使用迭代添加l2 = [1, ' A ', 3,4,
, the first 17 bits are all numbers, the last digit or x, we try to use the regular to represent:Requirements on two constraintsIt's not good to write.Match at least 15 timesThis is a more professional way of writing.Escape character \ Now to match \ n, slash needs to be escaped2 underscores are escapedGreedy match greedy match: matches the string as long as possible when matching matches, by default, greedy matchThe result is aBecause it's going to be hard to go back, so it's as much as possibl
(Boss_jin) Teddy.bite () Execution output:A_SB launched an attack.Kim's boss launched an attack.A fool bites a man in a mouthfulThen the question came, and the man launched an attack, who did he attack?Interactive Teddy hit Alex for a second.Class Person: role = ' person ' # static attribute def __init__ (self, name, sex, HP, AD): self.name = name # object Property Property self.sex = sex self.hp = hp self.ad = AD def attack (self): print ('%s laun
preservation.f.closed# If the file is closed, returns truef.encoding# viewing the encoding format of open files using the, note that not the actual encoding format of the fileF.tell #查看文件处理当前的光标位置F.seek (3) #从头开始运算, move the cursor to the third byteF.truncate #从头开始运算, files are kept only from 0-10 bytes of content, and the file must be opened in writing, except for ' W ' and ' w+ '.6 advanced application of the Seek methodSeek a total of 2 parameters, the first parameter is the number of cursor
outside the function are global variables, such as $x and $y.Then to use them inside the function, you must use the Global keyword to declare that these two things are global variables before they can be used, otherwise the use of the OH.This must be remembered, because it is very useful, because we often need to use global variables when writing programs with functions.Let's take another look at the code: function myTest () { static$x=0; Echo $x ; $x+ +See here we see there is a
form to define the types of inputs.Then when the user clicks the Submit button, the form submits all the contents of the form to another page.So how do you know which page to submit the form to, and note that the page is written in the form's properties.name= "Input" action= "html_form_action.php" method = "Get" >That's it, action this property is written by the user click on the Submit button, the form of the data submitted to the page, this PHP file will usually be sent over the form of dat
= None)
"" "Replace" "" s = "Alex SB Alex" ret = S.replace ("Al", "BB") ("Al", "BB", from left to right first) p Rint (ret) # # #打印bbex SB Bbex
Rstip (self,chars = None)
"" "Split" "" s = "Alexalex" ret = S.split ("E") ("E", 1) print (ret) # # #打 Indian [' Al ', ' xal ' x ']
Swapcase (self)
"" "uppercase lowercase, lowercase to uppercase" "" s = Qiao print (S.swapcase ()) # # #打印qIAO
Title (self)
"" "Conversion title" " s =" The school "
additions and deletions to components, pager componentsFifth: Do CRM Asset Management for the companySixth article: do permission control based on flaskSeventh article: Reptile ProjectEighth: Luffy Construction。。。。。。。Source Analysis:First article: FlaskArticle Two: DjangoThe third article: django-restframework Source Flow AnalysisFinance and Algorithms:First article: Introduction to FinanceSecond: quantitative investment and PythonArticle Three: Ipython basic understandingFourth article: NumPy
Some time ago I summarized several recursive solutions to the full arrangement problem. Today I will summarize how to implement the full arrangement problem through non-recursive simulation of system stack behavior.
We use an array stack [] to represent a stack, a top pointe
>123123TD> TR> TR> TD>AlexTD> TD>123123TD> TR> TR> TDcolspan=2>Watchmakers: XXXTD> TR> Table>Body>HTML>Tables are created using tags You cannot use the In addition to the Across rows and across columns, the cross-row and cross-column display can only be set in TD or TH, because this is the operation of the cell, and the TD and th are the cells.TR is not a cell, it is an entire row.There are also cell spacing, margins, and so o
of the IP packet is 20 bytes, plus the embedded TCP packet, the total length becomes 5000 bytes.7 Ethernet ProtocolFinally, the IP packet is embedded in the Ethernet packet. Ethernet packet needs to set the MAC address of both sides, the sender is the local network card MAC address, the receiver is the gateway 192.168.1.1 MAC address (through the ARP protocol).The data portion of the Ethernet packet, the maximum length is 1500 bytes, and now the IP packet length is 5000 bytes. Therefore, IP pac
to Level Three
Vim. Test Create a hidden file (not a folder) press I into insert (insert mode) to finish writing the file press ESC to exit, and then press shift+: then enter WQ and then hit enter to save and exit.
Cat 111 shows this file
More 111 slowly look at this file enter (a line of the look) space (one page to see)
mkdir 111 Creating 111 folders
Mkdir-p creation of Cn/hebei/xingtai recursion
MV 111 222/move 111 to 222
Tree 111 shows the structure of the 111 directory
DF V
Chapter Content
Module Introduction
Timedatetime
Random
Os
Sys
Shutil
Jsonpickle
Shelve
XML processing
YAML processing
Configarser
Hashlib
Subprocess
Logging
First, Module introductionModule, a collection of code that implements a function with a single piece of code.Like functional programming and process-oriented programming, functional programming accomplishes a function, and other code is used to invoke it, providing reusabili
Full-stack Python development-Linux Command learning and pythonlinux command
Linux-everything is a file
Pwd: view the current directory
'/': Root directory
Cd: Switch the directory eg. cd/to the root directory
Ls: Check that the current root directory contains several disks and files.
Ls-l: View Details (the first character is d --> directory)
Ls-lh: user
Python entry password, do not echo the password# !/usr/bin/env python = Getpass.getpass ("")Python Write code considerations:
Create an English-language Python directory for storing Python files, not in Chinese.
Create a xxxx.py file, such as test.py
Write header file:# !/usr/bin/env python # -*-coding:utf-8-*-
Rules for writing code functions
Input differences between Python2 and Python3Python2 using Raw_input ()Python3 using input ()Python
Function Call functionFunction names can be passed as argumentsfunction name () execution functionFunction name refers to the function itself#!/usr/bin/env python#-*-coding:utf-8-*-defF1 ():return "F1"#f1 = function#F1 = The surrogate function#f1 () = Execute functiondefF2 (ARG): Arg ()return "F2"#x = 123#f1 = F1 function#F2 = F2 function#F2 (x)#Execute F2 function, F1 function as argumentF2 (F1)Python Full stack
1. Parameters of the function, reference 2. Lambda expression 3. Python's built-in function 4. Recursive 5. File operations1. Open FileOpen (file name/file path, open mode, encoding)Open mode: R read-only mode, default is read-onlyW write mode, unreadable; Create a file that does not exist; Clears the contents of the file if it existsX write mode, unreadable, file does not exist, create one, file exists, errorA append mode. The file does not exist, a file is created, and if the file exists, it i
(and all files are stored in bytes, using this mode regardless of the text file character encoding, picture file JGP format, video file avi format)RB Wbab Note: When opened in B, the content read is byte type, write also need to provide byte type, cannot specify encoding #3, ' + ' mode (is added a function)r+, read and write "readable, writable" W+ , write read"writable, readable" A +, write read "writable, readable"#4, read/ write, read/write to bytes type, r+ B, read and write"readable, writa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.